package com.atao.baokede.controller;

import com.atao.baokede.pojo.Result;
import com.atao.baokede.pojo.Test;
import com.atao.baokede.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 测试层
 */
@RestController
@RequestMapping("/test")
public class TestController {
    @Autowired
    private TestService testService;
    /**
     * 测试方法
     * @return 测试结果
     */
    @GetMapping
    public Result<List<Test>> test() {
        return Result.success(testService.test());
    }
}
